extern "C" {
#include "sizes.h"
#include "comm.h"
#include "transact.h"
#include "operate.h"
#include "table.h"
#include "funcids.h"
}
#include "PETCommsHandler.h"                  // Added Code
#include "CommsHandlerAll.h"
//#include "HostInterfaceManager.h"
//#include "TXOHostInterfaceManager.h"
#include "SoftPayUCLActivator.h"


#include "Project.hpp"

TRANSACTION_OBJECT* pobTranSERF;
TRANSACTION_OBJECT* pobTranPET;


//static TXOHostInterfaceManager hostInterfaceManager;
static PETHostInterfaceActivator activator;
//static SoftPayBaseCommsHandler commsHandler;  // Old Code
static PETCommsHandler commsHandler;        // New Code
static SoftPayUCLActivator spUCL;



CommsHandler* getCommsHandler() {
    //getHostInterface();

    pobTranPET = pstGet_pobTran();
    //if ( pobTran == NULL )
    //    return VS_ERR;

    activator.setPobTran(pobTranPET);
    commsHandler.setHostInterface(&activator);
    commsHandler.setUCL(&spUCL);
    return &commsHandler;
}





